<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>VA Course Schedule</title>
    </h:head>
    <body>
        <h:form id="form1">
        <p:growl id="pop-up-message" showDetail="true" sticky="false" />
        <p:layout fullPage="true">
            <p:layoutUnit position="north">
                    <p:toolbar >
                        <p:toolbarGroup align="left">
                            <p:outputLabel value="Symantec Virtual Academy Class Scheduler" />
                        </p:toolbarGroup>
                        <p:toolbarGroup align="right">
                            <p:commandButton type="push" title="New" icon="ui-icon-document" />
                            <p:commandButton type="push" title="Edit" icon="ui-icon-pencil" />
                            <p:commandButton type="push" title="Delete" icon="ui-icon-trash" />
                            <p:separator />
                            <p:commandButton type="push" title="User editor" icon="ui-icon-person" />
                            <p:commandButton type="push" title="Pod editor" icon="ui-icon-bullet" />
                            <p:separator />
                            <p:commandButton type="push" title="Export" icon="ui-icon-extlink" />
                        </p:toolbarGroup>
                    </p:toolbar>
            </p:layoutUnit>
            <p:layoutUnit position="west" size="325" resizable="false">
                <p:calendar mode="inline" />
                <p:panel header="Details" toggleable="true">
                     <h:outputText value="details will be shown here." />
                </p:panel>
            </p:layoutUnit>
            <p:layoutUnit position="center">
                <p:tabView id="course-tabs" >
                    <p:tab id="pod-booking-tab" title="Pod booking" closable="false" ></p:tab>
                    <p:tab id="class-checkpoint-tab" title="Class checkpoint" closable="false" >
                        <p:dataTable id="checkpoint-table" value="#{checkpointFacade.checkpoint}" var="item" editable="true" editMode="cell"
                                     scrollRows="20" scrollable="true" liveScroll="true" scrollHeight="300">                            
                            <p:ajax event="cellEdit" listener="#{checkpointFacade.onEdit}" update=":form1:pop-up-message" />
                            <!-- <p:column style="width:4%">
                                <p:rowEditor />
                            </p:column>
                            <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Id"/>
                                        </f:facet>
                                        <h:outputText value="#{item.id}"/>
                                    </h:column> -->
                           
                            <p:column id="idColumn" headerText="#">
                                <p:cellEditor>
                                    <f:facet name="output">
                                        <h:outputText value="#{item.id}" />
                                    </f:facet>
                                    <f:facet name="input">
                                        <h:outputText value="#{item.id}" />
                                    </f:facet>
                                </p:cellEditor>
                            </p:column>
                            <p:column id="startDateColumn" headerText="Start on">
                                <p:cellEditor>
                                    <f:facet name="output">
                                        <h:outputText value="#{item.startdate}" /> 
                                    </f:facet>
                                    <f:facet name="input">
                                        <p:calendar value="#{item.startdate}" />
                                    </f:facet>
                                </p:cellEditor>
                            </p:column>
                            <p:column id="endDateColumn" headerText="End on">
                                <p:cellEditor>
                                <f:facet name="output">
                                        <h:outputText value="#{item.enddate}" /> 
                                    </f:facet>
                                    <f:facet name="input">
                                        <p:calendar value="#{item.enddate}" />
                                    </f:facet>
                                </p:cellEditor>
                            </p:column>
                            <!-- <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="ClassStatus"/>
                                        </f:facet>
                                        <h:outputText value="#{item.classStatus}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="OpenStatus"/>
                                        </f:facet>
                                        <h:outputText value="#{item.openStatus}"/>
                                    </h:column>-->
                            <p:column id="courseNameColumn" headerText="Course name">
                                <p:cellEditor>
                                 <f:facet name="output">
                                        <h:outputText value="#{item.coursename}" /> 
                                    </f:facet>
                                    <f:facet name="input">
                                        <h:inputText value="#{item.coursename}" />
                                    </f:facet>
                                </p:cellEditor>
                            </p:column>
                            
                            <p:column id="regionColumn" headerText="Region">
                                <p:cellEditor>
                                    <f:facet name="output">
                                        <h:outputText value="#{item.region}"/>
                                    </f:facet>
                                    <f:facet name="input">
                                        <h:inputText value="#{item.region}"/>
                                    </f:facet>
                                </p:cellEditor>
                            </p:column>
                            
                            <p:column id="countryColumn" headerText="Country">
                                <p:cellEditor>
                                    <f:facet name="output">
                                        <h:outputText value="#{item.country}"/>
                                    </f:facet>
                                    <f:facet name="input">
                                        <h:inputText value="#{item.country}"/>
                                    </f:facet>
                               </p:cellEditor>
                            </p:column>
                            <p:column id="daysColumn" headerText="Days">
                                <p:cellEditor>
                                    <f:facet name="output" >
                                        <h:outputText value="#{item.days}"/>
                                    </f:facet>
                                    <f:facet name="input" >
                                        <p:spinner value="#{item.days}" style="width:10px" min="1" max="32" />
                                    </f:facet>
                                </p:cellEditor>
                            </p:column>
                            <p:column id="instructorColumn" headerText="Instructor">
                                <p:cellEditor>
                                    <f:facet name="output" >
                                        <h:outputText value="#{item.instructor}"/>
                                    </f:facet>
                                    <f:facet name="input" >
                                        <p:inputText value="#{item.instructor}" size="64" />
                                    </f:facet>
                                </p:cellEditor>
                            </p:column>
                            <p:column id="podIdColumn" headerText="Pod id">
                                        <p:cellEditor>
                                            <f:facet name="output">
                                                <h:outputText value="#{item.pod}"/>
                                            </f:facet>
                                            <f:facet name="input">
                                                <p:inputText value="#{item.pod}" size="5" />
                                            </f:facet>
                                        </p:cellEditor>
                            </p:column>
                            <f:facet name="footer">
                                <p:commandButton type="push" title="View" icon="ui-icon-search"/>
                            </f:facet>
                        </p:dataTable>
                        <!--
                        <f:view>
                            <h:form>
                                <h:dataTable value="#{checkpointFacade.checkpoint}" var="item">
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Id"/>
                                        </f:facet>
                                        <h:outputText value="#{item.id}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Startdate"/>
                                        </f:facet>
                                        <h:outputText value="#{item.startdate}">
                                            <f:convertDateTime pattern="MM/dd/yyyy" />
                                        </h:outputText>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Enddate"/>
                                        </f:facet>
                                        <h:outputText value="#{item.enddate}">
                                            <f:convertDateTime pattern="MM/dd/yyyy" />
                                        </h:outputText>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Coursename"/>
                                        </f:facet>
                                        <h:outputText value="#{item.coursename}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="ClassStatus"/>
                                        </f:facet>
                                        <h:outputText value="#{item.classStatus}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="OpenStatus"/>
                                        </f:facet>
                                        <h:outputText value="#{item.openStatus}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Region"/>
                                        </f:facet>
                                        <h:outputText value="#{item.region}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Country"/>
                                        </f:facet>
                                        <h:outputText value="#{item.country}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Bdm"/>
                                        </f:facet>
                                        <h:outputText value="#{item.bdm}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="VaOwner"/>
                                        </f:facet>
                                        <h:outputText value="#{item.vaOwner}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Days"/>
                                        </f:facet>
                                        <h:outputText value="#{item.days}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Instructor"/>
                                        </f:facet>
                                        <h:outputText value="#{item.instructor}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="EventType"/>
                                        </f:facet>
                                        <h:outputText value="#{item.eventType}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="StartTime"/>
                                        </f:facet>
                                        <h:outputText value="#{item.startTime}">
                                            <f:convertDateTime pattern="HH:mm:ss" />
                                        </h:outputText>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="TimeZone"/>
                                        </f:facet>
                                        <h:outputText value="#{item.timeZone}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Pod"/>
                                        </f:facet>
                                        <h:outputText value="#{item.pod}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="LabView"/>
                                        </f:facet>
                                        <h:outputText value="#{item.labView}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="PptsLoaded"/>
                                        </f:facet>
                                        <h:outputText value="#{item.pptsLoaded}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Mattavainstassigned"/>
                                        </f:facet>
                                        <h:outputText value="#{item.mattavainstassigned}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Qachk"/>
                                        </f:facet>
                                        <h:outputText value="#{item.qachk}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Bdmchk"/>
                                        </f:facet>
                                        <h:outputText value="#{item.bdmchk}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Student"/>
                                        </f:facet>
                                        <h:outputText value="#{item.student}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="StudentDetail"/>
                                        </f:facet>
                                        <h:outputText value="#{item.studentDetail}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="EbookSent"/>
                                        </f:facet>
                                        <h:outputText value="#{item.ebookSent}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="EmailSent"/>
                                        </f:facet>
                                        <h:outputText value="#{item.emailSent}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="ScriptRun"/>
                                        </f:facet>
                                        <h:outputText value="#{item.scriptRun}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="ScriptOwn"/>
                                        </f:facet>
                                        <h:outputText value="#{item.scriptOwn}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="PortalClassComp"/>
                                        </f:facet>
                                        <h:outputText value="#{item.portalClassComp}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="SecondPod"/>
                                        </f:facet>
                                        <h:outputText value="#{item.secondPod}"/>
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="Notes"/>
                                        </f:facet>
                                        <h:outputText value="#{item.notes}"/>
                                    </h:column>
                                </h:dataTable>
                            </h:form>
                        </f:view>
                        -->
                      
                        

                    </p:tab>
                </p:tabView>
            </p:layoutUnit>
        </p:layout>
        </h:form>
    </body>
</html>
